﻿

-- 修改人员用工状态
CREATE procedure [dbo].[Ryinfo_UpdateBatch_Ygzt]
@sfzh varchar(max),
@ygzt bit
as
declare @sql varchar(max),@zt varchar(30)
if(@ygzt=1)
begin
set @zt= ',intime=getdate(),outtime=null'
end
else
begin
set @zt= ',outtime=getdate()'
end
set @sql = 'update Ry_Info set ygzt='+cast(@ygzt as varchar)+@zt+' where sfzh in ('+@sfzh+')'
exec(@sql)